class Sales::StoreProductsController < ApplicationController
  before_action :set_category, :set_store
  layout 'sale'
  def index
    @store_id ||= params[:store_id]
    @store_products = @category.products.useable.showable
  end

  private
  def set_category
    @category = StoreProductCategory.find(params[:product_category_id])
  end

  def set_store_id
    @normal_store_id = decode(params[:store_id])
  end

  def set_store
    @store = Store.find(set_store_id)
  end
end
